#pragma once

#ifndef PARTICLE_H_
#define PARTICLE_H_

#include <list>
#include "Objects/GameObject.h"

#include <SFML\Graphics\Shader.hpp>


using namespace std;
using namespace sf;

class Particle : public GameObject
{
public:
	Particle(GameState *gameState);
	~Particle();

	virtual void draw();

	virtual void update(double dt);

	const float* getEndColor() const;

	void setEndColor(float r, float g, float b, float a = 1.0f);

	void setShader(Shader *shader);

	void setLifeTime(float lifeTime);

	void setVel(const b2Vec2 &vel){ m_vel = vel; } 

	void init();


private:
	Shader *m_shader;

	b2Vec2 m_vel;

	float m_time;
	float m_life;
	float m_lifeTime;

	float m_endColor[4];

};

#endif
